package com.bytedance.speech.speechdemo.http



public infix fun <A, B> A.toMap(that: B): Pair<A, B> = Pair(this, that)
fun String.appendHtmlMap(vararg pairs: Pair<String,String>):String{
    val sb = StringBuffer()
    if(this[this.lastIndex]=='?'){
        sb.append(this)
    }else{
        sb.append(this)
        sb.append('?')
    }

    pairs.forEach {
        sb.append(it.first)
        sb.append("=")
        sb.append(it.second)
        sb.append("&")
    }
    return sb.toString()
}